Repository navigation
fix(relinker): match needed module names that differ only in the extension - #1830
Conversation
|
Tested on Windows with a second title that hits the same failure as #1794 item 1. Setup: Windows 11 22621, GCC 15.2.0 UCRT Release, this PR (cb571d3) merged onto main d70b899. Title: Palworld (PPSA23126, v01.102.999). Case: the eboot's Result: with this PR the relinked Local variant: folding ASCII case in Limits: one title; the run only shows that module loading passes, not that the title boots. Dying Light 2 not tested. AI-assisted: yes. |
…nsion A title's executable can name a bundled module differently from the file it ships: Dying Light 2 needs EOSSDK-PS5-Shipping.debug_prx and ships EOSSDK-PS5-Shipping.prx. Needed names were matched by exact filename, so the module was skipped without an error and start-up failed to load it. Renaming the file does not help either: the title later loads the module at run time by its shipped name (/app0//EOSSDK-PS5-Shipping.prx), and dlopen looks for that name's .guest.prx (boykopovar#1794). When no file has the needed name, a module whose name differs only in its .prx, .sprx or .debug_prx extension now satisfies it, in the module directories or elsewhere under the input. The output keeps the shipped file name, and the needed name is added as another name of that guest module. Two such candidates for one needed name are ambiguous, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Palworld's eboot needs EOSSDK-PS5-Shipping.debug_prx while the dump ships prx/eossdk-ps5-shipping.prx. On Windows, compare module stems without ASCII case, and let a name that already resolves to a guest image (exact or case-folded filename, or soname) win over a stem alias. Reported and diagnosed by @Rohan03x in boykopovar#1830. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cb571d3 to
0745d80
Compare
|
@Rohan03x thanks for the Palworld run and the diagnosis. I took your approach into the PR (0745d80, credited in the commit) rather than asking for the diff:
Also rebased onto current main (no conflicts). Full build + ctest 516/516 on Windows (GCC 15.2 UCRT); |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
…-prx fix(relinker): match needed module names that differ only in the extension
What
Fixes items 1 and 5 of #1794 (traced in this comment).
A title's executable can name a bundled module differently from the file it ships. Dying Light 2 (PPSA02262) needs
EOSSDK-PS5-Shipping.debug_prxand shipsEOSSDK-PS5-Shipping.prxbeside the executable. Needed names were matched by exact filename, so the relinker skipped the module without an error, and start-up stopped withFailed to load module: ...\libs\EOSSDK-PS5-Shipping.debug_prx. Renaming the file is not a workaround. The title later callssceKernelLoadStartModule("/app0//EOSSDK-PS5-Shipping.prx"), anddlopenlooks forapp0/EOSSDK-PS5-Shipping.prx.guest.prx. That load fails withENOENT, so the title's EOS lobby backend fails andCGame::InitializeassertsNet_StartUp failed.GuestModuleBuildernow resolves a needed name that no file has exactly to a module whose name differs only in its.prx,.sprxor.debug_prxextension. This applies both in the module directories and in the search under the input. The output keeps the shipped file name (EOSSDK-PS5-Shipping.prx.guest.prx), so run-time loads by that name find it. The needed name is added as another name of that guest module, so the executable binds to it instead of asking for a host library. An exact filename still wins. Two candidates for one needed name are ambiguous, as for exact names.Tested
Windows 11, MinGW GCC 15.2.0, RTX 3070:
guest_needed_moduleshas new cases. An executable needsneeded.debug_prxwhileneeded.prxis shipped, once inMedia/Modulesand once insce_module/, on both the Linux and the Windows output. The guest output isneeded.prx.guest.prx, the Linux executable'sDT_NEEDEDis that path and no hostneeded.debug_prx, and the Windows output runs and returns 42.needed.prxandneeded.sprxside by side are reported as ambiguous. Without the change the new cases fail; with it they pass.ctest: 479/479 pass.python tools/check_conventions.py --base origin/mainpasses.EOSSDK-PS5-Shipping.prx.guest.prxis produced, and with the title's logging enabled it reports[Lobby.Backend.Eos] > [StartUp] okand[Lobby] > [Initialize] all backends are up.Net_StartUppasses. The title then stops in EOS'sRtcNetworkThread, which is the socket descriptor /fd_setquestion raised in Dying Light 2 (PPSA02262) on Windows: what stops it between conversion and its own startup #1794 and is not part of this PR. Other Dying Light 2 (PPSA02262) on Windows: what stops it between conversion and its own startup #1794 items were worked around locally for this run.Linux output is covered by the test; I did not run a title on Linux.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code